package com.example.zhunongzonghe.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("zn_farmproduce")
public class ZnFarmproduce implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 农产品表
     */
    @TableId(value = "farm_id", type = IdType.AUTO)
    private Integer farmId;

    /**
     * 产品名
     */
    @TableField("farm_name")
    private String farmName;

    /**
     * 价格
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 产品简介
     */
    @TableField("farm_intro")
    private String farmIntro;

    /**
     * 分类
     */
    @TableField("sort_id")
    private Integer sortId;

    /**
     * 产品上下架状态：0为未下架，1为上架
     */
    @TableField("status")
    private Integer status;
    /**
     * 产品图片
     */
    @TableField("shop_picture")
    private String shopPicture;

    /**
     * 销量
     */
    @TableField("sales_volume")
    private Integer salesVolume;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    @TableField("deleted")
    @TableLogic
    private Integer deleted;
}
